Skip to main content

Led

Led img

1. Write standard firmata to the device

Uploading Standard Firmata to Arduino Open Arduino IDE. File > Examples > Firmata > StandardFirmata.

Tools > Board > your board Click Upload button. if you use WSL, you need to follow this

2. Run the LED

index.tsx
import { Board, Button, Led, render } from "edison"
import React from "react"

const App: React.FC = () => {
return (
<Board port={'/dev/tty***'} baudRate={57600}>
<Led pin={13} blink={500} />
</Board>
)
}

render(<App />)

3. execute the program

$ npx vite-node index.tsx 

The LED will blink every 500ms.

You can use <Led />

PropsTypeDescriptionDefault
pinnumberPin number to control currentNone
isOn?boolen/undefinedOn if LED is true, off if falseNone
blink?number/undefinedSet blinking sensation (ms)None